package cn.quang.search.admin.mapper;

import cn.quang.search.admin.entity.po.EntityDataSource;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author:  Entity Generator
 * @since:  2024-02-27 17:43:11
 */
public interface EntityDataSourceMapper extends BaseMapper<EntityDataSource> {

    default EntityDataSource selectByName(String dataSourceName) {
        return this.selectOne(new QueryWrapper<EntityDataSource>().lambda().eq(EntityDataSource::getName, dataSourceName));
    }
}
